package com.lookme.lmtool.cracker.filter.color;

import com.jhlabs.image.ExposureFilter;
import com.lookme.lmtool.cracker.CrackerConstants;
import com.lookme.lmtool.cracker.annotation.FilterAnnotation;
import com.lookme.lmtool.cracker.annotation.ParamAnnotation;
import com.lookme.lmtool.cracker.filter.AbstractFilter;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

import java.awt.image.BufferedImageOp;

@FilterAnnotation(groupName = CrackerConstants.FILTER_GROUP_NAME_COLOR,name="曝光",filterClass = ExposureFilter.class)
public class FilterExposure extends AbstractFilter {

    @XStreamAsAttribute
    @ParamAnnotation(name = "曝光度", desc = "曝光度",inputType = ParamAnnotation.InputType.Spinner,amountToStepBy = 0.1,max = 50)
    private float exposure=1.0f;

    @Override
    public BufferedImageOp getFilter() {
        ExposureFilter filter= new ExposureFilter();
        filter.setExposure(exposure);
        return filter;
    }

}
